package com.baicaoyuan.web.repository;


import com.baicaoyuan.web.model.JzzCurveDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 功能描述：
 *
 * @author 罗富祥
 * 创建时间： 2018/1/4
 * 版权：
 */
@Repository
public interface JzzCurveRepository extends JpaRepository<JzzCurveDO, Long> {

    @Query(value = "select * from t_jzz_curve ORDER BY id desc LIMIT 1",nativeQuery = true)
    JzzCurveDO findTopOrderByIdDesc();

    @Query(value = "select sum(total_price_30) from t_jzz_curve;", nativeQuery = true)
    List getSum30Price();
}
